// pages/webview/webview.js
Page({
    /**
     * 页面的初始数据
     */
    data: {
        requestUrl: getApp().globalData.requestUrl,
        source: "", //获取回跳路径
        qrcodeAPublish: "" ,// 二维码
        isShow:1
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        if (options.intoType!=''&& options.intoType != null){
            console.log("[webview]--->[qrcodeAPublish]" + wx.getStorageSync('qrCode'));
            var url = "";
            if(options.type == "fullPath"){
                url = options.intoType;
            }else{
                url = "/pages/" + options.intoType + "/" + options.intoType;
            }
            console.log("[webview]--->[拼装好的回跳地址]" + url);
            // 针对日志查询
            var qrcodeAPublish = "";
            if (wx.getStorageSync('qrCode') != "" && wx.getStorageSync('qrCode') != null){
              qrcodeAPublish = wx.getStorageSync('qrCode');
            }
            this.setData({
              source: encodeURIComponent(url),
              qrcodeAPublish: qrcodeAPublish
            })
          }
    },
    load:function(e){
      console.log(JSON.stringify(e))
      this.setData({
        isShow:0
      })
    },
    loadError:function(e){
      this.setData({
        isShow:0
      })
    },
    postMessage:function(e){
      console.log(11111)
      console.log(e)
    }

})